import { lazy } from "react";
let routes = [
    {
        path: '/layout',
        component: lazy(() => import('../views/layout')),
        meta:{},
        children: [
            {
                path: '/layout/home',
                component: lazy(() => import('../views/home')),//路由懒加载
                meta: { title: '首页', icon: 'icon-qiepian' },               
            },
            {
                path: '/layout/list',
                component: lazy(() => import('../views/list')),
                meta: { title: '列表', icon: 'icon-liebiao' }
            },
            {
                path: '/layout/car',
                component: lazy(() => import('../views/car')),
                meta: { title: '购物车', icon: 'icon-gouwucheman',isAuth:true}
            },
            {
                path: '/layout/my',
                component: lazy(() => import('../views/my')),
                meta: { title: '我的', icon: 'icon-wode' },
                children: [
                    {
                        path: '/layout/my/part1',
                        component: lazy(() => import('../views/my/part1')),
                        meta: { title: '部分一', icon: '' }
                    },
                    {
                        path: '/layout/my/part2',
                        component: lazy(() => import('../views/my/part2')),
                        meta: { title: '部分二', icon: '' }
                    }
                ]
            }
        ]
    },{
        path:'/login',
        component: lazy(() => import('../views/login')),
        meta:{
            title:'登录'
        }
    }
]

export default routes